home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-07 | 2.7 KB | 92 lines | [TEXT/ALFA] |
- #================================================================================
- proc red {} {
- colorize [getPos] [selEnd] red
- }
- proc blue {} {
- colorize [getPos] [selEnd] blue
- }
- proc yellow {} {
- colorize [getPos] [selEnd] yellow
- }
- proc newColor {} {
- colorize [getPos] [selEnd] [listpick -p "Color?" {red black yellow magenta white green blue cyan}]
- }
- proc colorCComment {} {
- insertText {/}
- if {([set pos [getPos]] >= 3) && ([lookAt [expr $pos - 2]] == "*")} {
- if {![catch {search -f 0 -r 0 -i 0 {/*} $pos} res]} {
- colorize [lindex $res 0] $pos red
- }
- }
- }
- bind '/' colorCComment
-
- addMenuItem -m colors "(-"
- addMenuItem -m colors "bold"
- addMenuItem -m colors "italic"
- addMenuItem -m colors "normal"
-
- proc colorizeTclComments {} {
- }
-
-
- #================================================================================
- # This is my current 'userStartup.tcl'. Use this as an example of what can
- # be done. Do not use any of this directly, as the your files are doubtless in
- # different locations than mine.
- #================================================================================
-
- init 1 2
-
- set backDir "$HOME:back"
-
- makeMenuPermanent $thinkMenu
- source $HOME:tcl:SystemCode:think.tcl
- insertMenu $thinkMenu
-
-
- #================================================================================
- # Redefinition of 'latex' from latex.tcl. It sends an additional open event to
-
- # Textures.
- proc latex {} {
- global latexPath
- set sig ""
- catch {string trim [lindex [getfinfo $latexPath] 1] '} sig
- set name [checkRunning latex $sig latexPath]
- if {![string length $name]} return
- switchTo $name
- catch {sendOpenEvent -n $name [lindex [winNames -f] 0]}
- }
-
- #================================================================================
-
- set backup 1
- if {[file exists "$HOME:EditSource"]} {
- set fileSets(Editor) [glob -t TEXT "$HOME:EditSource:*.c"]
- addMenuItem -m fileSets "Editor"
- }
-
- # source "$HOME:sample:filesetMenu.tcl"
-
- set horScrollBar 0
-
- #================================================================================
- # Lines added automatically.
- #================================================================================
-
-
- set thinkName "PowerPete:Development:Symantec C++ for Macintosh:THINK Project Manager"
- set excaliburPath "PowerPete:Textures:Excalibur1.4.1:Excalibur 1.4.1"
- set latexPath "PowerPete:Textures:Textures™ 1.6.2a1"
- set toolserverPath "PowerPete:Utils:ToolServer"
- set referencePath "PowerPete:Buckaroo:Buckaroo 2.0b1"
-
- set excaliburPath "PowerPete:Excalibur1.4.1:Excalibur 1.4.1"
-
- set "fileSets(Tcl 7.3)" [glob -t TEXT "PowerPete:Development:Alpha:Tcl 7.3:*.c"]
- addMenuItem -m fileSets "Tcl 7.3"
- set "fileSets(Mac Tcl)" [glob -t TEXT "PowerPete:Development:Alpha:Tcl 7.3:MacTcl Source:*.c"]
- addMenuItem -m fileSets "Mac Tcl"
-
-